home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Behavior.h
-
- Contains: Behavior magic
-
- Written by: Greg Anderson, Andy Nicholas, Chris Bingham
-
- Copyright: © 1992-1995 by Apple Computer, Inc., all rights reserved.
-
- <2> 6/15/95 ga
- */
-
- #ifndef Behavior_h
- #define Behavior_h
-
- #include "Object.h" // TObject is the base class of TBehavior
-
- #define clBehavior 99
-
- //========================================================================================
- // CLASS TBehavior
- //
- // TBehavior is an class for a behavior object that can be attached to something
- // deriving from TObject. TCommandHandlerBehavior and TThreadBehavior
- // derive from this class.
- //========================================================================================
-
- class TBehavior : public TObject
- {
- public:
- DeclareSmallClassData(TBehavior, TObject);
-
- virtual ~TBehavior();
-
- virtual void SetNextBehavior(TBehavior* behavior, TObject* owner);
- TBehavior* NextBehaviorOfClass(SInt32 classID) const;
-
- TObject* BehaviorOwner() const { return fBehaviorOwner; };
- TBehavior* NextBehavior() const { return fNextBehavior; };
-
- private:
- TObject* fBehaviorOwner;
- TBehavior* fNextBehavior;
- };
-
- #endif // ¬Behavior_h